package Model;

import java.io.Serializable;

/**
 * Player class, represents a general player (both fieldplayer and goalkeeper categories)
 *
 * @author Jose Filipe M Santos - 7277502
 * @author Matheus Martins Teixeira - 7277482
 */
public class Player implements Serializable {

    /**
     *
     */

    private String Name;
    private int Shirt;
    protected int Age;
    protected int Hability;

    /**
     * Class constructor (only one)
     *
     * @param pName PLayer's name
     * @param pAge  Player's age
     * @param pHab  Player's general hability
     */
    public Player(String pName, int pAge, int pHab) {

	this.Name = pName;
	this.Age = pAge;
	this.Hability = pHab;
	this.Shirt = 0;

    }

    /**
     * Returns the player's name
     *
     * @return Player's name
     */
    public String getName() {

	return Name;

    }

    /**
     * Returns the player's general hability (overrided by subclasses)
     *
     * @return General hability
     */
    public int getHability() {

	return Hability;

    }

    /**
     * Returns the player's general hability (not overrided by subclasses)
     *
     * @return General Hability
     */
    public int getGHability() {

	return Hability;

    }

    /**
     * Sets a shirt number for the player
     *
     * @param pShirt new number of player's shirt
     */
    public void setShirt(int pShirt) {

	this.Shirt = pShirt;

    }

    /**
     * Returns the player's age
     *
     * @return Player's age
     */
    public int getAge() {
	return Age;
    }

    /**
     * Returns the player shirt number
     *
     * @return Player's shirt number
     */
    public int getShirt() {
	return Shirt;
    }
}
